package com.soos.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description: 配置Redisson
 * User: sfx
 * Date: 2023-06-29
 * Time: 22:28
 */
@Component
public class RedissonConfig {
    @Bean
    public RedissonClient redissonClient() {
        //配置Redisson
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.238.128:6379").setPassword("123321");
        return Redisson.create(config);
    }
}